USE [zs_imitation]
GO
/****** Object:  Table [dbo].[users]    Script Date: 08/03/2011 21:21:30 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[users](
	[userid] [int] IDENTITY(1,1) NOT NULL,
	[username] [varchar](20) NULL,
	[password] [varchar](32) NULL,
	[roleid] [smallint] NULL,
	[lastloginip] [varchar](15) NULL,
	[lastlogintime] [datetime] NULL,
	[email] [varchar](40) NULL,
	[realname] [varchar](50) NOT NULL,
	[status] [smallint] NULL,
	[create_time] [datetime] NULL,
PRIMARY KEY CLUSTERED 
(
	[userid] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[admin]    Script Date: 08/03/2011 21:21:30 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[admin](
	[userid] [int] IDENTITY(1,1) NOT NULL,
	[username] [varchar](20) NULL,
	[password] [varchar](32) NULL,
	[roleid] [smallint] NULL,
	[encrypt] [varchar](6) NULL,
	[lastloginip] [varchar](15) NULL,
	[lastlogintime] [datetime] NULL,
	[email] [varchar](40) NULL,
	[realname] [varchar](50) NOT NULL,
PRIMARY KEY CLUSTERED 
(
	[userid] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Default [DF__admin__username__014935CB]    Script Date: 08/03/2011 21:21:30 ******/
ALTER TABLE [dbo].[admin] ADD  DEFAULT (NULL) FOR [username]
GO
/****** Object:  Default [DF__admin__password__023D5A04]    Script Date: 08/03/2011 21:21:30 ******/
ALTER TABLE [dbo].[admin] ADD  DEFAULT (NULL) FOR [password]
GO
/****** Object:  Default [DF__admin__roleid__03317E3D]    Script Date: 08/03/2011 21:21:30 ******/
ALTER TABLE [dbo].[admin] ADD  DEFAULT ('0') FOR [roleid]
GO
/****** Object:  Default [DF__admin__encrypt__0425A276]    Script Date: 08/03/2011 21:21:30 ******/
ALTER TABLE [dbo].[admin] ADD  DEFAULT (NULL) FOR [encrypt]
GO
/****** Object:  Default [DF__admin__lastlogin__0519C6AF]    Script Date: 08/03/2011 21:21:30 ******/
ALTER TABLE [dbo].[admin] ADD  DEFAULT (NULL) FOR [lastloginip]
GO
/****** Object:  Default [DF__admin__lastlogin__060DEAE8]    Script Date: 08/03/2011 21:21:30 ******/
ALTER TABLE [dbo].[admin] ADD  DEFAULT ('0') FOR [lastlogintime]
GO
/****** Object:  Default [DF__admin__email__07020F21]    Script Date: 08/03/2011 21:21:30 ******/
ALTER TABLE [dbo].[admin] ADD  DEFAULT (NULL) FOR [email]
GO
/****** Object:  Default [DF__admin__realname__07F6335A]    Script Date: 08/03/2011 21:21:30 ******/
ALTER TABLE [dbo].[admin] ADD  DEFAULT ('') FOR [realname]
GO
